#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void swap(int* as, int* aq)
{
	int tmp = *as;
	*as = *aq;
	*aq = tmp;
}
void maopao(int* a, int n)
{
	for (int i = 0; i < n; i++)
	{
		int j = 0;
		for (j = 0; j < n - i - 1; j++)
		{
			if (a[j] > a[j + 1])
			{
				swap(&a[j], &a[j + 1]);
			}
		}
	}
}
int main()
{
	int arr[] = { 45,547,56,76,8697,972,3,6,6897,780,8,23,37, };
	maopao(arr, sizeof(arr) / sizeof(arr[0]));
	for (int i = 0; i < sizeof(arr) / sizeof(arr[0]); i++)
	{
		printf("%d ", arr[i]);
	}
	return 0;
}